
/* Generated by Interface Builder */

#import "PrefMgr.h"

#import <appkit/Application.h>
#import <appkit/Window.h>
#import <appkit/Control.h>
#import <appkit/defaults.h>

#import "ProcessControl.h"

@implementation PrefMgr

- updateTimeFields
{
    updatetimevalue = [processControl updateTime];
    [updateTime setDoubleValue:updatetimevalue];
    [updateTimefield setDoubleValue:updatetimevalue];
    return self;
}

- perf:sender
{
    if (!window){
	[NXApp loadNibSection:"Pref.nib" owner:self withNames:NO fromZone:[self zone]];
	[self updateTimeFields];
    }
    [window makeKeyAndOrderFront:sender];
    return self;
}

- updateRevert:sender
{
    [self updateTimeFields];
    return self;
}

- updateOkay:sender
{
    char value[10];

    updatetimevalue = [updateTime doubleValue];
    [processControl setupdateTime: updatetimevalue];
    sprintf(value,"%lf",updatetimevalue);
    NXWriteDefault("Freeze","UpdateTime",value);
    return self;
}

@end
